package com.itheima.pojo;


import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * blog实体类
 */

@Table(name = "t_blog")
public class Blog implements Serializable {
    @Id
    private String uid; // 主键:唯一uid
    private String title; // 博客标题
    private String summary; // 博客简介
    private String content; // 博客内容
    private String tagUid; // 标签uid
    @Column(name = "click_count")
    private Integer clickCount; // 博客点击数
    private Integer collectCount; // 博客收藏数
    private String fileUid; // 标题图片UID
    private Integer status; // 状态 默认:1
    private Date createTime; // 创建时间
    private Date updateTime; // 更新时间
    private String adminUid; // 管理员UID
    private String isOriginal; // 是否原创
    private String author; // 如果原创，作者为管理员名
    private String articlesPart; // 文章出处
    private String blogSortUid; // 博客分类UID
    /**
     * 推荐级别，用于首页推荐
     * 0：正常
     * 1：一级推荐(轮播图)
     * 2：二级推荐(top)
     * 3：三级推荐 ()
     * 4：四级 推荐 (特别推荐)
     */
    private Integer level;
    @Column(name = "is_publish")
    private String isPublish; // 是否发布
    private Integer sort; // 排序字段，数值越大，越靠前
    private Integer startComment; //是否开启评论(0:否， 1:是)

    //以下字段不存入数据库，封装为了方便使用

    // 博客分类
    @Transient
    private BlogSort blogSort;

    // 标签,一篇博客对应多个标签
    @Transient
    private List<Tag> tagList;

    // 标题图
    @Transient
    private List<String> photoList;

    // 使用Sort字段进行排序 （0：不使用， 1：使用），默认为0
    @Transient
    private Integer useSort;

    // 无参构造方法，初始化默认值
    public Blog() {
        this.useSort = 0;
        this.level = 0;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTagUid() {
        return tagUid;
    }

    public void setTagUid(String tagUid) {
        this.tagUid = tagUid;
    }

    public Integer getClickCount() {
        return clickCount;
    }

    public void setClickCount(Integer clickCount) {
        this.clickCount = clickCount;
    }

    public Integer getCollectCount() {
        return collectCount;
    }

    public void setCollectCount(Integer collectCount) {
        this.collectCount = collectCount;
    }

    public String getFileUid() {
        return fileUid;
    }

    public void setFileUid(String fileUid) {
        this.fileUid = fileUid;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getAdminUid() {
        return adminUid;
    }

    public void setAdminUid(String adminUid) {
        this.adminUid = adminUid;
    }

    public String getIsOriginal() {
        return isOriginal;
    }

    public void setIsOriginal(String isOriginal) {
        this.isOriginal = isOriginal;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getArticlesPart() {
        return articlesPart;
    }

    public void setArticlesPart(String articlesPart) {
        this.articlesPart = articlesPart;
    }

    public String getBlogSortUid() {
        return blogSortUid;
    }

    public void setBlogSortUid(String blogSortUid) {
        this.blogSortUid = blogSortUid;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getIsPublish() {
        return isPublish;
    }

    public void setIsPublish(String isPublish) {
        this.isPublish = isPublish;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStartComment() {
        return startComment;
    }

    public void setStartComment(Integer startComment) {
        this.startComment = startComment;
    }

    public BlogSort getBlogSort() {
        return blogSort;
    }

    public void setBlogSort(BlogSort blogSort) {
        this.blogSort = blogSort;
    }

    public List<Tag> getTagList() {
        return tagList;
    }

    public void setTagList(List<Tag> tagList) {
        this.tagList = tagList;
    }

    public List<String> getPhotoList() {
        return photoList;
    }

    public void setPhotoList(List<String> photoList) {
        this.photoList = photoList;
    }

    public Integer getUseSort() {
        return useSort;
    }

    public void setUseSort(Integer useSort) {
        this.useSort = useSort;
    }




}
